<h1><%= title "Counties" %></h1>

<table>
  <tr>
    <th>Name</th>
    <th>Duchy</th>
	<th>Ruler</th>
    <th>Infrastructure</th>
  </tr>

<% for county in @counties %>
  <tr>
    <td><%=h county.name %></td>
    <td><%=link_to_record county.duchy %></td>
	<td><%=link_to_record Title.count_of county %></td>
    <td><%=h county.infrastructure %></td>
    <td><%= link_to 'Show', county %></td>
    <td><%= link_to 'Edit', edit_county_path(county) %></td>
    <td><%= link_to 'Destroy', county, :confirm => 'Are you sure?', :method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New county', new_county_path %> | <%= link_to 'Home', '/' %>
